//
//  TravalTableViewCell.m
//  TripGroup
//
//  Created by apple on 15/10/24.
//  Copyright © 2015年 lanou3g.com蓝鸥科技有限公司. All rights reserved.
//

#import "TravalTableViewCell.h"
#import "UIImageView+WebCache.h"
@implementation TravalTableViewCell

- (void)setConfigureModel:(TravelModel *)configureModel
{
    _configureModel = configureModel;
    [self.mainImageView sd_setImageWithURL:[NSURL URLWithString:configureModel.image]];
    self.titleLab.text = configureModel.title;
    self.descrLab.text = configureModel.descr;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.mainImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, SCREEN_WIDTH - 10, (SCREEN_HEIGHT - 64)*7/22)];
        [self.contentView addSubview:self.mainImageView];
        
        self.titleLab = [[UILabel alloc]initWithFrame:CGRectMake(5, (SCREEN_HEIGHT - 64)*7/22+5, SCREEN_WIDTH - 10, (SCREEN_HEIGHT - 64)*3/44)];
        self.titleLab.numberOfLines = 2;
        self.titleLab.font = [UIFont systemFontOfSize:17];
        [self.contentView addSubview:self.titleLab];
        
        self.descrLab = [[UILabel alloc]initWithFrame:CGRectMake(5, (SCREEN_HEIGHT - 64)*17/44+5, SCREEN_WIDTH - 10, (SCREEN_HEIGHT - 64)*3/44-5)];
        self.descrLab.numberOfLines = 2;
        self.descrLab.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.descrLab];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
